package parserdecoder

// type format string

// type Parser interface {
// 	Parse(io.Reader) error
// }

// type Decoder interface {
// 	Decode(io.Writer) error
// }

// type ParserBuilder func(common.Sorter, common.Filter) Parser

type decoderRegister map[string]DecoderBuilder

func (rter decoderRegister) Get(k string) (DecoderBuilder, bool) {
	v, ok := rter[k]
	return v, ok
}

var DecoderBuilders decoderRegister

func init() {
	DecoderBuilders = make(decoderRegister)
	DecoderBuilders["txt"] = NewDecoderTXT
	// DecoderBuilders["m3u"] = NewDecoderM3U
}
